PRTSEL31: Printer selections for the LAN Author: Daniel D. Stuhlman Original date: Feb. 4, 1994 Last revised: March 17, 1994 file: prtsel31.doc 0. Important notice This program is to be used for learning or demostration purposes only. It is not guarenteed to work for your network configuration. It has been throughly tested in my location, but it still may not work for you. There is no help available from the author. This document plus the comments in the source code should be enough for you to revise the system if it does not work. The program depends on two data bases created and maintained independently of this program. Copyright 1994 all rights reserved. I. Introduction The program PRTSEL31 is a utility designed to be a user-friendly front end for the Netware Capture command. PRTSEL31 presents the printer queue names and allows the user to select a queue and change the default options. Each option has built-in help screens. This program is a descendent of the printer select program written by Daniel Stuhlman in 1990 (version 1.0) and version 2 written by Terry Ward in 1993. Version 3.1 was completely rewritten in C++ and compiled using in Borland C++. II. Dependencies on other files Prtsel31 depends on two data bases maintained by LAN administration. PRINTER. DBF contains all the user names and the queues they are able to use. QUEUES. DBF contains all the messages for the queues. The program checks for these files. If they are missing the program will not work. These data bases should reside in the same directory as the program. The batch file to run this pro- gram should change directories to the one that contains the program and the data bases. Sample data bases are included with this program. Do not change the field length or number of fields or PRTSEL31 will not read the files correctly. CAPTURE.EXE is a Netware utility, which must be in the search path. AN environment variable named, USER, must exist that contains the users' names as in the dta base. Usually this is set when the person logs into the LAN. III. Program operation Printer.dbf is read to get the queues that the LAN user has the rights to use. These queues are matched to Queues.dbf to get the printer messages. This infor- mation is stored in two arrays, display_line and queue_mess. The background screen is drawn, then the two arrays are displayed. If the number of queues is greater than 8, the user may scroll from screen to screen. The screen number is displayed. Below are sample screens: Screen with printer queues. Ready for section of printer or to change defaults. During this screen the seconds should tick. ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/4/1994 11:09:49am บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษออออ Printer ออออออออ Location อออออออออออออออออ Message ออออออออออออออออออออป บ (A) Local Printer Do not use this choice on a shared printer. บ บ (B) ACC-FUND 3702 laserjet 4si Jetdirect card บ บ (C) MIS_2451-LJ4 2451 laserjet4 * phone first ! บ บ (D) MIS_2632-LJ3 2632 laserjet 3 บ บ บ บ บ บ บ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. F1 Help F2 Change default settings 1. Data file. 2. Show status 3. Exit. Enter your choice: Default settings: Enable |x| Banner|_| Formfeed |x| Number of copies |01| Timeout |010| No ban|x| No Formfeed|_| Form # | 0| Notify|N| Message displayed during option to change Timeout. ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/4/1994 12:02:06 pmบ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษออออ Printer ออออออออ Location อออออออออออออออออ Message ออออออออออออออออออออป บ ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออปบ บ บ Include this option if you want to print from an application without บบ บ บ exiting. The Timeout option sends data to the printer a specified numberบบ บ บ of seconds after the application last writes to the file. Increase the บบ บ บ Timeout if only part of the file is printed. If using a Postscript บบ บ บ printer, disable Timeout. That means TI=0 or make Enable a blank. บบ บ บ For example: 015 means wait 15 seconds before sending data to printer. บบ บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผบ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. Fษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Change the default settings. Use the key to move from field to บ Eบ to field. to accept changes and end. บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ Default settings: Enable |x| Banner|_| Formfeed | | Number of copies |01| Timeout |010| No ban|x| No Formfeed|x| Form # | 0| Notify|N| Screen messages for Banner ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/4/1994 12:02:06 pmบ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษออออ Printer ออออออออ Location อออออออออออออออออ Message ออออออออออออออออออออป บ ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออปบ บ บ If Banner is enabled the printer will print a banner page at the บบ บ บ beginning of your print job. Your logon name will be on the banner page. บบ บ บ Enter an X to enable or to disable. บบ บ บ บบ บ บ บบ บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผบ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. Fษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Change the default settings. Use the key to move from field to บ Eบ to field. to accept changes and end. บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ Default settings: Enable |x| Banner|_| Formfeed | | Number of copies |01| Timeout |010| No ban|x| No Formfeed|x| Form # | 0| Notify|N| Screen messages for form feed. ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/4/1994 12:02:06 pmบ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษอออออ Printer ออออออออ Location อออออออออออออออออ Message อออออออออออออออออออป บ ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออปบ บ บ Include this option to enable a form feed after your job has been บบ บ บ printed. FormFeed enabled means that the printer starts printing the nextบบ บ บ job at the top of the next sheet of paper. If an application sends a บบ บ บ form feed at the end of a print job, adding this option causes a blank บบ บ บ page to be fed through printer. บบ บ บ บบ บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผบ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. Fษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Change the default settings. Use the key to move from field to บ Eบ to field. to accept changes and end. บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ Default settings: Enable |x| Banner|_| Formfeed |x| Number of copies |01| Timeout |010| No ban|x| No Formfeed|_| Form # | 0| Notify|N| Message for copies. ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/4/1994 12:02:06 pmบ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษออออ Printer ออออออออ Location อออออออออออออออออ Message ออออออออออออออออออออป บ ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออปบ บ บ Use this option to indicate how many copies you want to print. บบ บ บ Default is 1. Enter two digits for number of copies. System allows บบ บ บ up to 99 copies. บบ บ บ บบ บ บ บบ บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผบ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. Fษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Change the default settings. Use the key to move from field to บ Eบ to field. to accept changes and end. บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ Default settings: Enable |x| Banner| | Formfeed | | Number of copies |01| Timeout |010| No ban|x| No Formfeed|x| Form # | 0| Notify|N| Form number message. ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/4/1994 12:02:06 pmบ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษออออ Printer ออออออออ Location อออออออออออออออออ Message ออออออออออออออออออออป บ ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออปบ บ บ Use this option to indicate which form number to use. At this time บบ บ บ we have not defined forms other than 0. บบ บ บ บบ บ บ บบ บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผบ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. Fษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Change the default settings. Use the key to move from field to บ Eบ to field. to accept changes and end. บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ Default settings: Enable |x| Banner|_| Formfeed | | Number of copies |01| Timeout |010| No ban|x| No Formfeed|x| Form # | 0| Notify|N| Messages for notify. ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/4/1994 12:02:06 pmบ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษออออ Printer ออออออออ Location อออออออออออออออออ Message ออออออออออออออออออออป บ ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออปบ บ บ Use this option if you want the file server to send you a message บบ บ บ when your print job is completed. บบ บ บ Enter a Y to enable or N for no. บบ บ บ บบ บ บ บบ บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผบ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. Fษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Change the default settings. Use the key to move from field to บ Eบ to field. to accept changes and end. บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ Default settings: Enable |x| Banner|_| Formfeed | | Number of copies |01| Timeout |010| No ban|x| No Formfeed|x| Form # | 0| Notify|N| Help for Form Feed ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/8/1994 3:07:30pm บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออUser: DONNIEอออออผ ษออออ Printer ออออออออ Location อออออออออออออออออ Message ออออออออออออออออออออป บ ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออปบ บ บ Include this option to enable a form feed after your job has been บบ บ บ printed. FormFeed enabled means that the printer starts printing the nextบบ บ บ job at the top of the next sheet of paper. If an application sends a บบ บ บ form feed at the end of a print job, adding this option causes a blank บบ บ บ page to be fed through printer. WordPerfect and 1-2-3 are among the บบ บ บ programs that send a form feed when done printing. บบ บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผบ บ บ ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ to quit without making any changes. Fษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Change the default settings. Use the key to move from field to บ Eบ to field. to accept changes and end. บ ศออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ Default settings: Enable |x| Banner| | Formfeed | | Number of copies |01| Timeout |010| No ban|x| No Formfeed|x| Form # | 0| Notify|N| General Help message. ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป บ Local Area Network Spooled Printers (PRTSEL3.1) 2/7/1994 12:27:01 pmบ ษอออออออออออออออออHelp Screenอออออออออออออออออออออออออออออออออออออออออออออออออป บ PRTSEL3 ver. 3.1 helps you control where you want to send your print job. บ บ บ บ All the printers that you are able to use are displayed. Choose the letter บ บ on the left side to choose a printer with the options at the bottom of the บ บ screen. บ บ บ บ If you want to capture to a file hit 1. This means all output will บ บ be saved to a file. Drive F: is assumed. To use this file end capturing บ บ by choosing 'A' for local printer. This is the same as the Netware Endcap บ บ command. บ บ To view the capture status, hit 2. บ บ To end this program without changes hit 3, or บ บ F2 enables changing the defaults on the bottom of the screen. บ บ Help is displayed when changing the default options. บ บ บ บ บ บ Call the Help Desk or enter 'Help Capture' at any DOS prompt to learn บ บ more about the options. บ บ บ ศออออออออออออHit any key to continue อออออออออออออออออออออออออออออออออออออออออผ dBase requires exclusive access to the data base files. When updates are performed on the data base file they should be done on a clone of the files and then copied to the production directory. IV. Defaults No banner, no form feed, timeout= 10, copies = 1, no notify V. Problems and solutions 1. The work station location in the queue name does not match the location or description in the message section. This means that the data bases are not matching the printer queue names correctly. Possible causes: queue name is misspelled or queue name is missing in queues.dbf. Solution: Check the data bases for errors. PRTSEL3.1 does not use the message section. The queue name on the left side of the screen is the one sent to the printer. 2. Message on screen: "Required file xxxxx.dbf doesn't exist." This means that the required data bases were not found. Solution: Make sure user is connected to the network. Make sure user has rights to directory containing data bases. If many users get the mes- sage, make sure the data bases are in the correct directory. 3. Error message indicating inability to write a file during an attempt to save print output to a file. This means the user does not have rights to the current directory. Solution: Use a full path without the drive letter. For example: \users\ 4. Speaker makes a beep. This means an incorrect character was input. Solution: Use only the characters allowed by the particular input request. 5. Only three printer choices appear. Those are the only printer queue choices allowed. If these choices do not match what you expect or different ones are needed, contact LAN administration to make changes. 6. The user name is blank or incorrect. PRTSEL31 checks the environment variable USER. If the users is not connected to the LAN or the environment variable was changed the name will not be correct. Solution: Connect to the network, fix the environment variable, or notify LAN Administration. 7. Screen message: The name, CAPTURE.EXE, is not recognized as an internal command ... A vital file is missing. Solution: Find out why CAPTURE.EXE is not in your search path. 8. After requesting a print the screen and one job ran into someone else's job. PRTSEL31 sets the default for FormFeed to none. Most applications gen- erate a form feed so that the next job starts on the top of a new sheet of paper. Screen prints do not generate form feeds. Solution: Change the option to FormFeed on or use the option to send print information to a file. Edit the file to include a form feed at the end. The character for a form feed is a control-L.